﻿/******************************************************************************
 * 
 * Announce: CSharpKit, Basic algorithms, components and definitions.
 *           Copyright (C) ShenYongchen.
 *           All rights reserved.
 *   Author: 申永辰.郑州 (shenyczz@163.com)
 *  WebSite: http://github.com/shenyczz/CSharpKit
 *
 * THIS CODE IS LICENSED UNDER THE MIT LICENSE (MIT).
 * THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF 
 * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
 * IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
 * PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
 * 
******************************************************************************/

using CSharpKit.Numerics.Distributions;
using CSharpKit.Numerics.Theories;

namespace CSharpKit.Numerics.LinearAlgebra
{
    internal class VectorBuilderDouble : VectorBuilder<double>
    {
        public override Vector<double> Dense(VectorStorageDense<double> storage)
        {
            return new Doubles.DenseVector(storage);
        }

        public override Vector<double> Sparse(VectorStorageSparse<double> storage)
        {
            return new Doubles.SparseVector(storage);
        }

        public override Vector<double> Random(int length, IContinuousDistribution distribution)
        {
            return Dense(Generator.Random(length, distribution));
        }






        //}}@@@
    }

}

